<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ page import="java.sql.Date" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sapfree.core.db.Record"%>
<%
String path = request.getContextPath();
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="login,regist first">
<meta http-equiv="description" content="This is login page">

<title>我的飞客</title>
<Link Rel="SHORTCUT ICON" href="../images/tux.png">
<link href="<%=path%>/include/styleBase/css/fontStyle.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/formStyle.css" rel="stylesheet"></link>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<style>
/* Fvalidate Styles */
.inp-focus {
        border: 1px solid #73AAD2;
        }
.inp-error {
        border: solid 1px #CC6666;
		background-color: #FFF2F2;
        }
.err-msg {
        display: block;
        font-size: 0.85em;
		margin:4px;
		color:#C66;
		font-weight:bold;
        }
</style>

<%
String contextpath = request.getContextPath();
Record personinfo = request.getAttribute("personinfo")==null?null:(Record)request.getAttribute("personinfo");
String personuuid = "";
String firstname = "";
String lastname = "";
String email = "";
String sex = "";
String usertype = "";
String locationcode = "";
int birthyear = 0;
int birthmonth = 0;
int birthday = 0;
String invitecode = "";

if(personinfo!=null){
	personuuid = personinfo.getString("PI_UUID");
	firstname = personinfo.getString("PI_FIRSTNAME");
	lastname = personinfo.getString("PI_LASTNAME");
	email =personinfo.getString("PI_EMAIL");
	sex = personinfo.getString("PI_SEX");
	usertype = personinfo.getString("PI_USERTYPE");
	locationcode = personinfo.getString("PI_LOCATIONCODE");
}
%>
</head>
<body>
<form id="frm" name="frm" method="post">
<br><br><br><br>
<table border="0" cellspacing="20" cellpadding="0" bgcolor="#CCCCCC" width="1000" align="center">
	<tr>
		<td height="200" bgcolor="#FFFFFF">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        	<tr>
           	  <td width="59%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                	<tr><td height="35">&nbsp;</td>
                	  <td height="35" colspan="3" class="blueBold14" valign="bottom">注册</td>
               	    </tr>
                    <tr><td height="25">&nbsp;</td>
                	  <td height="25" colspan="3" class="blueNormal12">目前仅对邀请会员开放注册。</td>
               	    </tr>
                    <tr><td height="5">&nbsp;</td>
                	  <td height="5" colspan="3" align="left">
                      	<hr size="1" width="350" color="#999999" align="left">                      </td>
           	    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" nowrap class="blueBold14">姓：</td>
                      <td style=" position:relative"><input required="yes" name="PERSON_PI_FIRSTNAME" id="PERSON_PI_FIRSTNAME" type="text" class="textInput" style="width:200px" value="<%=firstname%>" onFocus="_showcomment('PERSON_PI_FIRSTNAME')" tabindex="1">                      </td>
                      <td>
                      <input name="MESSAGE_PERSON_PI_FIRSTNAME" id="MESSAGE_PERSON_PI_FIRSTNAME" type="text" style="width:350px;display:none;"  value="请输入您的真实姓名，方便朋友查找" class="textInputInfo" readonly>                      </td>
                </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" nowrap class="blueBold14">名：</td>
                      <td><input required="yes" name="PERSON_PI_LASTNAME" id="PERSON_PI_LASTNAME" type="text" class="textInput" style="width:200px" value="<%=lastname%>" tabindex="2" >                      </td>
                      <td>
                      <input name="MESSAGE_PERSON_PI_LASTNAME" id="MESSAGE_PERSON_PI_LASTNAME" type="text" style="width:350px;display:none;" class="textInputOk" readonly></td>
                    </tr>
                    <tr>
                      <td width="4%" align="right">&nbsp;</td>
                   	  <td width="22%" height="35" align="right" nowrap class="blueBold14">电子邮箱：</td>
                   	  <td valign="middle" nowrap style=" position:relative">
                     <input required="yes" rule="email" name="PI_EMAIL" id="PI_EMAIL" type="text" class="textInput" style="width:200px;" value="<%=email%>" error="输入格式不正确" label="电子邮箱" onFocus="_showcomment('PI_EMAIL')" tabindex="3">                      </td>
                      <td>
                      <input name="MESSAGE_PI_EMAIL" id="MESSAGE_PI_EMAIL" type="text" style="width:350px;display:none;" class="textInputInfo" value="请输入您的电子邮箱地址" readonly>                      </td>
                    </tr>
                   
                    <tr>
                      <td align="right">&nbsp;</td>
                   	  <td height="35" align="right" class="blueBold14">登录密码：</td>
                       	<td>
                        <input required="yes" name="PI_PASSWORD" id="PI_PASSWORD" type="password" class="textInput" style="width:200px" error="输入的密码不一致" label="登录密码" onFocus="_showcomment('PI_PASSWORD')" tabindex="4">                        </td>
                        <td>
                        <input name="MESSAGE_PI_PASSWORD" id="MESSAGE_PI_PASSWORD" type="text" style="width:350px;display:none;" class="textInputInfo" value="请输入6位以上密码" readonly>                       </td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">确认密码：</td>
                      <td align="left" valign="middle" >
                      <input required="yes" name="PI_PASSWORD2" id="PI_PASSWORD2" type="password" class="textInput" style="width:200px" label="登录密码" error="两次输入的密码不一致" onFocus="_showcomment('PI_PASSWORD2')" tabindex="5">                      </td>
                      <td>
                      <input name="MESSAGE_PI_PASSWORD2" id="MESSAGE_PI_PASSWORD2" type="text" style="width:350px;display:none;" class="textInputInfo" value="请再次输入密码，两次输入的密码须一致">                      </td>
                    </tr>
                    
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">MSN账号：</td>
                      <td align="left" valign="middle" ><input type="text" class="textInput" style="width:200px" name="PERSON_PI_MSN" onFocus="_showcomment('PI_MSN')" tabindex="6"></td>
                      <td>
                        <input name="MESSAGE_PI_MSN" id="MESSAGE_PI_MSN" type="text" style="width:350px;display:none;" class="textInputInfo" value="请输入您的MSN，这将有助于别人找到您" readonly>                       </td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">QQ号：</td>
                      <td align="left" valign="middle" ><input type="text" class="textInput" style="width:200px" name="PERSON_PI_QQ" onFocus="_showcomment('PI_QQ')" tabindex="7"></td>
                      <td>
                        <input name="MESSAGE_PI_MSN" id="MESSAGE_PI_MSN" type="text" style="width:350px;display:none;" class="textInputInfo" value="请输入您的QQ号，这将有助于别人找到您" readonly>                       </td>
                    </tr>
                    
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">性别：</td>
                      <td width="22%" align="left" valign="middle" ><input tabindex="8" required="yes" name="PERSON_PI_SEX" id="PERSON_PI_SEX" type="radio" value="1" <%if("1".equals(sex)){%>checked<%}%>>男&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input tabindex="9" required="yes" name="PERSON_PI_SEX" id="PERSON_PI_SEX" type="radio" value="2" <%if("2".equals(sex)){%>checked<%}%>>女</td>
                      <td align="left" valign="middle" >
                      <input name="MESSAGE_PERSON_PI_SEX" id="MESSAGE_PERSON_PI_SEX" type="text" style="width:350px;display:none;" class="textInputOk">                      </td>
                </tr>
                
                	
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">用户类别：</td>
                      <td align="left" valign="middle" >
                      <input tabindex="10" type="radio" name="PERSON_PI_USERTYPE" id="PERSON_PI_USERTYPE" value="11" <%if("11".equals(usertype)){%>checked<%}%>>外部顾问
                      &nbsp;&nbsp;
                      <input tabindex="11" type="radio" name="PERSON_PI_USERTYPE" id="PERSON_PI_USERTYPE" value="10" <%if("10".equals(usertype)){%>checked<%}%>>内部顾问                 </td>
                      <td align="left" valign="middle" >
                      <input tabindex="12" name="MESSAGE_PERSON_PI_USERTYPE" id="MESSAGE_PERSON_PI_USERTYPE" type="text" style="width:350px;display:none;" class="textInputOk">                      </td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">Base地：</td>
                      <td align="left" valign="middle" ><select name="PERSON_PI_LOCATIONCODE" style="width:200px; font-size:16px">
                      <option value="0"  <%if("0".equals(locationcode)){%>selected<%}%>>请选择您的Base地</option>
                      </select></td>
                      <td align="left" valign="middle" >
                      <input name="MESSAGE_PERSON_PI_LOCATIONCODE" id="MESSAGE_PERSON_PI_LOCATIONCODE" type="text" style="width:350px;display:none;" class="textInputOk">                      </td>
                </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">邀请码：</td>
                      <td align="left" valign="middle" ><input tabindex="14" type="text" name="invitecode" class="textInput" style="width:200px" value="<%=invitecode%>" onFocus="_showcomment('invitecode')"></td>
                      <td align="left" valign="middle" >
                      <input name="MESSAGE_invitecode" id="MESSAGE_invitecode" type="text" style="width:350px;display:none;" class="textInputInfo" value="请输入您的邀请码">
                      </td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">&nbsp;</td>
                      <td colspan="2" align="left" valign="middle" >
                      		<table border="0" cellpadding="0" cellspacing="0" width="80">
                                	<tr>
                            			<td width="100" height="20" bgcolor="f6891f" align="center" style="cursor:hand;"><span style="color:#FFFFFF; font-weight:bold; font-size:12px;" onClick="_regist()">注 册</span></td>
                                	</tr>
                                </table>                      </td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td height="35" align="right" class="blueBold14">&nbsp;</td>
                      <td colspan="2" align="right" valign="middle" class="orangeNormal14"> 
                     
                                <a href="resumeview1.html">+简历预览</a>&nbsp;&nbsp;                     </td>
                    </tr>
              </table>              </td>
        </tr>
        </table>
      </td> 
	</tr>
   
</table>
<br>
<br>
<br>
</form>
</body>

</html>

<script type="text/javascript" src="../include/Fvalidate/jquery.js" ></script>
<script type="text/javascript" src="../include/Fvalidate/Fvalidate.js" ></script>

<script language="javascript">
$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
	$("input[name=PI_PASSWORD2]").sameAs($("input[name=PI_PASSWORD]"));
});
</script>
<script language="javascript">
var checkobj;
function _regist(){
	frm.action="<%=request.getContextPath()%>/regist/registservlet?method=registPersonInfo";
	frm.submit();
}

function _showcomment(obj){
	document.getElementById("MESSAGE_"+obj).style.display="block";
}
</script>
